<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
 <pre>

 </pre>
 <div id="app">
	<div>{{a}}</div>
	<input type="text" v-model="a" @keyup.q="handle">
 </div>
 <script>
 Vue.config.keyCodes.q=81;
	 var vm=new Vue({
	 el:'#app',
	 data:{
	 a:'',
	 },methods:{
	 handle(){
		console.log('按键成功')
	 }
	 }
	 })
 </script>
</body>

</html>